import java.util.Scanner;

public class text2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个整数");
        int n =sc.nextInt();
        System.out.println("第"+n+"位的斐波那契数是"+fib(n));
    }
    public static int fib(int n){
        if(n<=2){
            return 1;
        }
        else{
            return fib(n-1) + fib(n-2);
        }
    }

    public static void main1(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入三个整数：");
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        System.out.println("这三个数最大值：" + Max3(a,b,c));
    }
    public static int Max2(int a,int b){
        int tmp = (a>b) ? a :b;
        return tmp;
    }
    public static int Max3(int a,int b,int c){
        int max2 = Max2(a,b);
        int max = (max2>c) ? max2 :c;
        return max;
    }

}
